// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import Mint from 'mint-ui';
import VueResource from 'vue-resource'
// import Navigation from 'vue-navigation'
import store from '@/store/index'
// import {setCookie,getCookie} from '@/util/user'
// import getuser from '@/util/getuser'

// Vue.use(Navigation, {router, store})
Vue.use(Mint);
Vue.use(VueResource);
Vue.config.productionTip = false

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  components: { App },
  template: '<App/>',
  // watch : {
  //   "$route": 'checkLogin'
  // },
  // created() {
  //   this.checkLogin();
  // },
  // methods : {
  //   checkLogin(){
  //     var user=getuser();
  //     // var path=this.$route.path
  //     if (user.userId  ){
  //       //如果没有登录状态则跳转到登录页
  //       this.$router.replace('/login');
  //     }
  //   },
  // },
})
